<template>
  <div class="app-container">
    <!--    查询对话框-->
    <el-dialog
      :title="title"
      v-model="openSearch"
      :close-on-click-modal="false"
      draggable
      width="650px"
      append-to-body
    >
      <el-form
        :model="queryParams"
        ref="queryForm"
        :inline="true"
        v-show="showSearch"
        label-width="68px"
        style="margin-left: 55px"
      >
        <el-col :span="24">
          <el-form-item label="模具编号" prop="itdMjbh">
            <el-input
              v-model="queryParams.itdMjbh"
              placeholder="请输入模具编号"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="物料代码" prop="itdWldm">
            <el-input
              v-model="queryParams.itdWldm"
              placeholder="请输入物料代码"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="客户编码" prop="itdWldm">
            <el-input
              v-model="queryParams.itmCustwldm"
              placeholder="请输入客户编码"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item prop="lqmZtbz">
            <el-radio-group v-model="queryParams.nopg">
              <el-radio label="1">只显示未完成工单且未上传完整的记录</el-radio>
              <el-radio label="2">只显示未上传完整的记录</el-radio>
              <el-radio label="3">只显示超出报价周期的记录</el-radio>
              <el-radio label="-1">全部</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item
            style="margin-top: 25px; display: flex; justify-content: flex-end"
          >
            <el-button @click="cancel">取消</el-button>
            <el-button type="primary" @click="handleQuery">确认</el-button>
          </el-form-item>
        </el-col>
      </el-form>
    </el-dialog>
    <el-row :gutter="20" style="display: flex">
      <!--模具数据-->
      <div class="head-container">
        <el-tree
          style="
            width: 350px;
            height: 830px;
            overflow: hidden;
            overflow-y: scroll;
          "
          :data="deptOptions"
          :props="defaultProps"
          :expand-on-click-node="false"
          :filter-node-method="filterNode"
          ref="tree"
          node-key="id"
          :default-expanded-keys="expandedKey"
          @node-click="handleNodeClick"
        />
      </div>
      <div style="overflow: hidden">
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-search"
              size="mini"
              @click="handleSearch"
              >搜索</el-button
            >
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['project:itdDet:add']"
              >新增</el-button
            >
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="mini"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['project:itdDet:edit']"
            >
              修改
            </el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="mini"
              :disabled="multiple"
              @click="handleDelete"
              v-hasPermi="['project:itdDet:remove']"
            >
              删除
            </el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              :loading="exportLoading"
              @click="handleExport"
              v-hasPermi="['project:itdDet:export']"
            >
              导出
            </el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              :loading="exportLoading"
              @click="handleInspectionExport"
              v-hasPermi="['project:MoldingMstr:exportInspection']"
            >
              工艺稽查导出
            </el-button>
          </el-col>
          <el-col :span="2.2" style="position: absolute; right: 35px; top: 0">
            <Page
              style="margin-right: 0px"
              :current="queryParams.pageNum"
              :page-size="queryParams.pageSize"
              :total="total"
              @on-change="pageChange"
              simple
            ></Page>
          </el-col>
          <right-toolbar
            :showSearch.sync="showSearch"
            @queryTable="getList"
          ></right-toolbar>
        </el-row>
        <el-table
          v-loading="loading"
          ref="tabIdt"
          border
          size="mini"
          :height="tableH"
          stripe
          highlight-current-row
          :header-cell-style="{ 'text-align': 'center', padding: '2px' }"
          @row-click="getItdFileList"
          :data="itdDetList"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="50" align="center" />

          <el-table-column
            label="成型参数"
            width="77"
            align="center"
            prop="itdFileA"
          />
          <!-- <el-table-column fixed="right" label="作业标准上传" align="center" width="120" class-name="small-padding fixed-width">
            <template #default="scope">
              <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="(file) => beforeUpload(file, 'B')">
                <el-button size="mini" type="text" v-hasPermi="['project:itdDet:upload']">
                  作业标准
                  <i class="el-icon-upload el-icon--right"></i>
                </el-button>
              </el-upload>
            </template>
          </el-table-column> -->
          <el-table-column
            label="作业标准"
            width="77"
            align="center"
            prop="itdFileB"
          />
          <!-- <el-table-column fixed="right" label="图纸信息上传" align="center" width="120" class-name="small-padding fixed-width">
            <template #default="scope">
              <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="(file) => beforeUpload(file, 'C')">
                <el-button size="mini" type="text" v-hasPermi="['project:itdDet:upload']">
                  图纸信息
                  <i class="el-icon-upload el-icon--right"></i>
                </el-button>
              </el-upload>
            </template>
          </el-table-column> -->
          <el-table-column
            label="图纸信息"
            width="77"
            align="center"
            prop="itdFileC"
          />
          <el-table-column
            label="模具编号"
            show-overflow-tooltip
            width="140px"
            prop="itdMjbh"
          />
          <el-table-column
            label="模具名称"
            show-overflow-tooltip
            width="150px"
            prop="mjmMjmc"
          />
          <el-table-column
            label="物料代码"
            show-overflow-tooltip
            align="center"
            width="120px"
            prop="itdWldm"
          />
          <el-table-column
            label="客户编码"
            show-overflow-tooltip
            align="center"
            width="120px"
            prop="itmCustwldm"
          />
          <el-table-column
            label="品名规格"
            show-overflow-tooltip
            width="300px"
            prop="itmPmgg"
          />
          <el-table-column
            label="图纸编号"
            align="center"
            show-overflow-tooltip
            width="120px"
            prop="itmTzbh"
          />
          <el-table-column
            label="穴数"
            align="center"
            width="80"
            prop="itdXs"
          />
          <el-table-column label="成型时间" align="center" prop="itdCxsj" />
          <el-table-column label="加工人员" align="center" prop="itdJgrs" />
          <el-table-column label="建立人员" align="center" prop="createBy" />
          <el-table-column
            label="建立日期"
            align="center"
            prop="createTime"
            width="150"
          >
            <template #default="scope">
              <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
            </template>
          </el-table-column>
          <el-table-column label="更改人员" align="center" prop="updateBy" />
          <el-table-column
            label="更改日期"
            align="center"
            prop="updateTime"
            width="150"
          >
            <template #default="scope">
              <span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
            </template>
          </el-table-column>
        </el-table>
        <el-tabs v-model="activeTab">
          <el-tab-pane label="成型参数" name="first">
            <el-table
              v-loading="loading"
              border
              size="mini"
              :data="FileAList"
              stripe
              highlight-current-row
              :row-style="{ padding: '0px' }"
              :cell-style="{ padding: '0px 0' }"
              :header-row-style="{ padding: '2px 0' }"
              :header-cell-style="{ 'text-align': 'center', padding: '2px' }"
              :height="tableHChild"
            >
              <el-table-column label="#" width="40" align="center" />
              <el-table-column
                label="文件编号"
                width="150"
                align="center"
                prop="docDjbh"
              />
              <el-table-column
                label="文件类型"
                width="120"
                align="center"
                prop="docType"
              >
                <template #default="scope">
                  <dict-tag
                    :options="docTypeOptions"
                    :value="scope.row.docType"
                  />
                </template>
              </el-table-column>
              <el-table-column
                label="适用吨位"
                width="100"
                align="center"
                prop="docJtdw"
              />
              <el-table-column
                label="适用机台"
                width="100"
                align="center"
                prop="docSyjt"
              />
              <el-table-column
                label="备注"
                width="150"
                align="center"
                prop="docDesc"
              />
              <el-table-column
                label="操作"
                align="center"
                width="100"
                class-name="small-padding fixed-width"
              >
                <template #default="scope">
                  <el-button
                    size="mini"
                    type="text"
                    @click="handleImgLook(scope.row)"
                    v-hasPermi="['project:mjmMstr:lookFile']"
                    >查看</el-button
                  >
                  <el-button
                    size="mini"
                    type="text"
                    @click="handleImgUpdate(scope.row)"
                    v-hasPermi="['project:docList:edit']"
                    >修改</el-button
                  >
                  <el-button
                    size="mini"
                    type="text"
                    v-hasPermi="['project:docList:remove']"
                    @click="handleFileDelete(scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
              <el-table-column
                label="建立人员"
                width="100"
                align="center"
                prop="createBy"
              />
              <el-table-column
                label="建立日期"
                width="150"
                align="center"
                prop="createTime"
              />
              <el-table-column
                label="更新人员"
                width="100"
                align="center"
                prop="updateBy"
              />
              <el-table-column
                label="更新日期"
                width="150"
                align="center"
                prop="updateTime"
              />
            </el-table>
            <div class="rbtn">
              <el-button type="primary" size="mini" @click="handleClick('A')">
                成型参数上传
                <i class="el-icon-upload el-icon--right"></i>
              </el-button>
            </div>
          </el-tab-pane>
          <el-tab-pane label="作业标准" name="second">
            <el-table
              v-loading="loading"
              border
              size="mini"
              :data="FileBList"
              stripe
              highlight-current-row
              :row-style="{ padding: '0px' }"
              :cell-style="{ padding: '0px 0' }"
              :header-row-style="{ padding: '2px 0' }"
              :header-cell-style="{ 'text-align': 'center', padding: '2px' }"
              :height="tableHChild"
            >
              <el-table-column label="#" width="40" align="center" />
              <el-table-column
                label="文件编号"
                width="150"
                align="center"
                prop="docDjbh"
              />
              <el-table-column
                label="文件类型"
                width="120"
                align="center"
                prop="docType"
              >
                <template #default="scope">
                  <dict-tag
                    :options="docTypeOptions"
                    :value="scope.row.docType"
                  />
                </template>
              </el-table-column>
              <el-table-column
                label="适用编码"
                width="100"
                align="center"
                prop="docSybh"
              />
              <el-table-column
                label="备注"
                width="150"
                align="center"
                prop="docDesc"
              />
              <el-table-column
                label="操作"
                align="center"
                width="100"
                class-name="small-padding fixed-width"
              >
                <template #default="scope">
                  <el-button
                    size="mini"
                    type="text"
                    @click="handleImgLook(scope.row)"
                    v-hasPermi="['project:mjmMstr:lookFile']"
                    >查看</el-button
                  >
                  <el-button
                    size="mini"
                    type="text"
                    v-hasPermi="['project:mjmMstr:deleteFile']"
                    @click="handleFileDelete(scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
              <el-table-column
                label="建立人员"
                width="100"
                align="center"
                prop="createBy"
              />
              <el-table-column
                label="建立日期"
                width="150"
                align="center"
                prop="createTime"
              />
            </el-table>
            <div class="rbtn">
              <el-button type="primary" size="mini" @click="handleClick('B')">
                作业标准上传
                <i class="el-icon-upload el-icon--right"></i>
              </el-button>
            </div>
            <!--            <div class="rbtn">-->
            <!--              <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="(file) => beforeUpload(file, 'B')">-->
            <!--                <el-button type="primary" size="mini" v-hasPermi="['project:itdDet:upload']">-->
            <!--                  作业标准上传-->
            <!--                  <i class="el-icon-upload el-icon&#45;&#45;right"></i>-->
            <!--                </el-button>-->
            <!--              </el-upload>-->
            <!--            </div>-->
          </el-tab-pane>
          <el-tab-pane label="图纸信息" name="Tre">
            <el-table
              v-loading="loading"
              border
              size="mini"
              :data="FileCList"
              stripe
              highlight-current-row
              :row-style="{ padding: '0px' }"
              :cell-style="{ padding: '0px 0' }"
              :header-row-style="{ padding: '2px 0' }"
              :header-cell-style="{ 'text-align': 'center', padding: '2px' }"
              :height="tableHChild"
            >
              <el-table-column label="#" width="40" align="center" />
              <el-table-column
                label="文件编号"
                width="150"
                align="center"
                prop="docDjbh"
              />
              <el-table-column
                label="文件类型"
                width="120"
                align="center"
                prop="docType"
              >
                <template #default="scope">
                  <dict-tag
                    :options="docTypeOptions"
                    :value="scope.row.docType"
                  />
                </template>
              </el-table-column>
              <el-table-column
                label="适用吨位"
                width="100"
                align="center"
                prop="docJtdw"
              />
              <el-table-column
                label="适用机台"
                width="100"
                align="center"
                prop="docSyjt"
              />
              <el-table-column
                label="备注"
                width="150"
                align="center"
                prop="docDesc"
              />
              <el-table-column
                label="操作"
                align="center"
                width="100"
                class-name="small-padding fixed-width"
              >
                <template #default="scope">
                  <el-button
                    size="mini"
                    type="text"
                    @click="handleImgLook(scope.row)"
                    v-hasPermi="['project:mjmMstr:lookFile']"
                    >查看</el-button
                  >
                  <el-button
                    size="mini"
                    type="text"
                    v-hasPermi="['project:mjmMstr:deleteFile']"
                    @click="handleFileDelete(scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
              <el-table-column
                label="建立人员"
                width="100"
                align="center"
                prop="createBy"
              />
              <el-table-column
                label="建立日期"
                width="150"
                align="center"
                prop="createTime"
              />
            </el-table>
            <div class="rbtn">
              <el-upload
                action="#"
                :http-request="requestUpload"
                :show-file-list="false"
                :before-upload="(file) => beforeUpload(file, 'C')"
                :disabled="!clickTzbh"
              >
                <el-button
                  type="primary"
                  size="mini"
                  v-hasPermi="['project:itdDet:upload']"
                  :disabled="!clickTzbh"
                >
                  图纸信息上传
                  <i class="el-icon-upload el-icon--right"></i>
                </el-button>
              </el-upload>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </el-row>
    <!--    成型参数弹窗-->
    <el-dialog
      :title="title"
      v-model="openStrA"
      :close-on-click-modal="false"
      draggable
      width="500px"
      append-to-body
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-col :span="12">
          <el-form-item label="模具编号" prop="itdMjbh">
            <el-input v-model="clickMjbh" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 24px">
          <el-input v-model="itdMjmc" disabled />
        </el-col>
        <el-col :span="12">
          <el-form-item label="物料代码" prop="itdWldm">
            <el-input v-model="clickWldm" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 22px">
          <el-input v-model="itdPmgg" disabled />
        </el-col>
        <el-col :span="24">
          <el-form-item label="图纸编号" prop="itdXs">
            <el-input v-model="itdCustwldm" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="机台吨位" prop="jtmJtdw">
            <el-select
              v-model="form.jtmJtdw"
              filterable
              clearable
              placeholder="请选择机台吨位"
            >
              <el-option
                v-for="dict in jtdwOptions"
                :key="dict.jtm_jtdw_key"
                :label="dict.jtm_jtdw"
                :value="dict.jtm_jtdw_key"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="20">
          <el-form-item label="适用机台" prop="Jt">
            <el-input v-model="Jt" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="2" style="margin-left: 15px">
          <el-button
            type="primary"
            icon="el-icon-plus"
            circle
            @click="clickChoose"
            :disabled="!form.jtmJtdw"
          ></el-button>
        </el-col>
        <el-col :span="24">
          <el-form-item label="备注">
            <el-input v-model="jtBz" placeholder="请输入加工人员" />
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="formTitle == '武汉衡德智造云平台'">
          <div
            class="dialog-footer"
            style="display: flex; justify-content: flex-end"
          >
            <el-button @click="cancelStr">取 消</el-button>
            <el-button @click="handleInsertMold" :disabled="!form.jtmJtdw"
              >确 定</el-button
            >
          </div>
        </el-col>
        <el-col :span="24" v-else>
          <div
            class="dialog-footer"
            style="display: flex; justify-content: flex-end"
          >
            <el-upload
              action="#"
              :http-request="requestUpload"
              :show-file-list="false"
              :before-upload="(file) => beforeUploading(file, 'A')"
              :disabled="Jt === ''"
            >
              <el-button :disabled="Jt === ''">
                上传
                <i class="el-icon-upload el-icon--right"></i>
              </el-button>
            </el-upload>
            <el-button @click="cancelStr" style="margin-left: 10px"
              >取 消</el-button
            >
          </div>
        </el-col>
      </el-form>
    </el-dialog>
    <!--    作业标准弹窗-->
    <el-dialog
      :title="title"
      v-model="openStrB"
      :close-on-click-modal="false"
      draggable
      width="720px"
      append-to-body
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-col :span="12">
          <el-form-item label="模具编号" prop="itdMjbh">
            <el-input v-model="clickMjbh" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 24px">
          <el-input v-model="itdMjmc" disabled />
        </el-col>
        <el-col :span="12">
          <el-form-item label="物料代码" prop="itdWldm">
            <el-input v-model="clickWldm" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 22px">
          <el-input v-model="itdPmgg" disabled />
        </el-col>
        <el-col :span="12">
          <el-form-item label="父项物料" prop="fxWldm">
            <el-select
              v-model="fxWldm"
              @change="getPmgg(fxWldm, 'B')"
              filterable
              placeholder="请输入物料代码"
              clearable
              size="small"
              style="width: 260px"
            >
              <el-option
                v-for="dict in FxWldmOptions"
                :label="dict.itm_custwldm"
                :key="dict.itm_custwldm"
                :value="dict.itm_custwldm"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 22px">
          <el-input v-model="fxPmgg" disabled />
        </el-col>
        <el-col :span="24">
          <el-form-item label="备注">
            <el-input v-model="jtBz" placeholder="请输入备注" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div
            class="dialog-footer"
            style="display: flex; justify-content: flex-end"
          >
            <el-button @click="cancelStr">取 消</el-button>
            <el-upload
              action="#"
              :http-request="requestUpload"
              :show-file-list="false"
              :before-upload="(file) => beforeUploading(file, 'B')"
              :disabled="fxWldm === ''"
            >
              <el-button :disabled="fxWldm === ''" size="small">
                上传
                <i class="el-icon-upload el-icon--right"></i>
              </el-button>
            </el-upload>
          </div>
        </el-col>
      </el-form>
    </el-dialog>
    <!--    设备选取对话框-->
    <el-dialog
      :title="titleStr"
      v-model="openChoose"
      :close-on-click-modal="false"
      draggable
      width="500px"
      append-to-body
    >
      <el-table
        v-loading="loading"
        border
        size="mini"
        height="300"
        :data="itmDetList"
        :header-cell-style="{ 'text-align': 'center' }"
        @selection-change="handleSelectionChanges"
      >
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="机台编号" align="center" prop="jtmJtbh" />
        <el-table-column label="机台吨位" align="center" prop="jtmJtdw" />
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancelChoose">取 消</el-button>
        <el-button type="primary" @click="submitFormJt">确 定</el-button>
      </div>
    </el-dialog>

    <!-- 添加或修改模具对应物料信息对话框 -->
    <el-dialog
      :title="title"
      v-model="open"
      :close-on-click-modal="false"
      draggable
      width="600px"
      append-to-body
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-col :span="24">
          <el-form-item label="模具编号" prop="itdMjbh">
            <el-select
              v-model="form.itdMjbh"
              :filter-method="getMjbhListTOP50"
              @change="getMjmc(form.itdMjbh)"
              filterable
              placeholder="请输入模具编号"
              clearable
              size="small"
              style="width: 480px"
            >
              <el-option
                v-for="dict in mjmMjbhList"
                :label="dict"
                :key="dict"
                :value="dict"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="模具名称" prop="itdMjmcs">
            <el-input
              v-model="itdMjmcs"
              disabled
              placeholder="输入模具编号后自动获取"
            />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="物料代码" prop="itdWldm">
            <el-select
              v-model="form.itdWldm"
              :filter-method="getWldmListTOP50"
              @change="getPmgg(form.itdWldm, 'A')"
              filterable
              placeholder="请输入物料代码"
              clearable
              size="small"
              style="width: 480px"
            >
              <el-option
                v-for="dict in custwldmList"
                :label="dict"
                :key="dict"
                :value="dict"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="品名规格" prop="itmPmgg">
            <el-input
              v-model="this.itmPmggs"
              disabled
              placeholder="输入物料代码后自动获取"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="穴数" prop="itdXs">
            <el-input v-model="form.itdXs" placeholder="请输入穴数" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="成型时间" prop="itdCxsj">
            <el-input v-model="form.itdCxsj" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="加工人员" prop="itdJgrs">
            <el-input v-model="form.itdJgrs" placeholder="请输入加工人员" />
          </el-form-item>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="submitForm">确 定</el-button>
      </div>
    </el-dialog>

    <!-- 修改成型参数适用机台 -->
    <el-dialog
      :title="title"
      v-model="openForming"
      :close-on-click-modal="false"
      draggable
      width="600px"
      append-to-body
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-col :span="24">
          <el-form-item label="机台吨位" prop="jtmJtdw">
            <el-select
              v-model="form.jtmJtdw"
              filterable
              clearable
              placeholder="请选择机台吨位"
            >
              <el-option
                v-for="dict in jtdwOptions"
                :key="dict.jtm_jtdw_key"
                :label="dict.jtm_jtdw"
                :value="dict.jtm_jtdw_key"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="22">
          <el-form-item label="适用机台" prop="Jt">
            <el-input v-model="Jt" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="1" style="margin-left: 10px">
          <el-button
            type="primary"
            icon="el-icon-plus"
            circle
            @click="clickChoose"
            :disabled="!form.jtmJtdw"
          ></el-button>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="updateFormingParameter"
          >确 定</el-button
        >
      </div>
    </el-dialog>
    <!-- 注塑参数成型表 -->
    <el-dialog
      title="注塑参数成型表"
      v-model="moldOpen"
      class="pdDialog"
      :close-on-click-modal="false"
      width="1100px"
    >
      <el-form
        ref="pdForm"
        :model="moldingForm"
        label-width="90px"
        inline
        size="mini"
        class="pdForm"
      >
        <table
          class="table-border"
          style="width: 1000px; table-layout: fixed; text-align: center"
        >
          <colgroup>
            <col
              width="26"
              style="mso-width-source: userset; mso-width-alt: 832"
            />
            <col
              width="29"
              span="2"
              style="mso-width-source: userset; mso-width-alt: 928"
            />
            <col
              width="37"
              span="8"
              style="mso-width-source: userset; mso-width-alt: 1184"
            />
            <col
              width="54"
              style="mso-width-source: userset; mso-width-alt: 1728"
            />
            <col
              width="37"
              span="2"
              style="mso-width-source: userset; mso-width-alt: 1184"
            />
            <col
              width="28"
              style="mso-width-source: userset; mso-width-alt: 896"
            />
            <col
              width="37"
              style="mso-width-source: userset; mso-width-alt: 1184"
            />
            <col
              width="75"
              class="xl66"
              style="mso-width-source: userset; mso-width-alt: 2400"
            />
            <col
              width="34"
              class="xl66"
              style="mso-width-source: userset; mso-width-alt: 1088"
            />
            <col
              width="47"
              style="mso-width-source: userset; mso-width-alt: 1504"
            />
            <col
              width="75"
              style="mso-width-source: userset; mso-width-alt: 2400"
            />
          </colgroup>
          <tbody>
            <tr
              height="32"
              style="
                height: 24pt;
                mso-height-source: userset;
                mso-height-alt: 480;
              "
            >
              <td
                class="xl70"
                height="32"
                colspan="2"
                style="
                  height: 24pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                客户
              </td>
              <td class="xl72" colspan="4">
                <el-input
                  v-model="moldingForm.cusName"
                  disabled
                  readonly
                  placeholder="自动生成"
                  class="readonlyInput"
                />
              </td>
              <td class="xl70" colspan="3">产品名称</td>
              <td class="xl97" colspan="3">
                <el-input
                  v-model="moldingForm.itmWlpm"
                  disabled
                  readonly
                  placeholder="自动生成"
                  class="readonlyInput"
                />
              </td>
              <td class="xl70" colspan="3">机台规格</td>
              <td class="xl100" colspan="2">
                <el-input v-model="moldingForm.moldDw" class="readonlyInput" />
              </td>
              <td class="xl70" colspan="2">模穴数</td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.mjmXs"
                  disabled
                  readonly
                  placeholder="自动生成"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr
              height="40"
              style="
                height: 30pt;
                mso-height-source: userset;
                mso-height-alt: 600;
              "
            >
              <td
                class="xl70"
                height="40"
                colspan="2"
                style="
                  height: 30pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                原料
              </td>
              <td class="xl75" colspan="4">
                <el-input
                  v-model="moldingForm.moldRawMaterial"
                  disabled
                  readonly
                  placeholder="自动生成"
                  class="readonlyInput"
                />
              </td>
              <td class="xl70" colspan="3">物料编码</td>
              <td class="xl101" colspan="3">
                <el-input
                  v-model="moldingForm.moldCustwldm"
                  readonly
                  class="readonlyInput"
                />
              </td>
              <td class="xl70" colspan="3">模具编码</td>
              <td class="xl104" colspan="2">
                <el-input
                  v-model="moldingForm.moldMjbh"
                  readonly
                  class="readonlyInput"
                />
              </td>
              <td class="xl70" colspan="2">产品周期</td>
              <td class="xl72">
                <el-input v-model="moldingForm.moldZq" class="readonlyInput" />
              </td>
            </tr>
            <tr
              height="40"
              style="
                height: 30pt;
                mso-height-source: userset;
                mso-height-alt: 600;
              "
            >
              <td
                class="xl70"
                height="40"
                colspan="2"
                style="
                  height: 30pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                色母
              </td>
              <td class="xl75" colspan="4">
                <el-input
                  v-model="moldingForm.molSm"
                  disabled
                  readonly
                  placeholder="自动生成"
                  class="readonlyInput"
                />
              </td>
              <td class="xl70" colspan="3">产品颜色</td>
              <td class="xl105" colspan="3">
                <el-input
                  v-model="moldingForm.itmYsdm"
                  disabled
                  readonly
                  placeholder="自动生成"
                  class="readonlyInput"
                />
              </td>
              <td class="xl70" colspan="3">烘料温度</td>
              <td class="xl106" colspan="2">
                <el-input
                  v-model="moldingForm.moldHlwd"
                  class="readonlyInput"
                />
              </td>
              <td class="xl118" colspan="2">
                色母添加
                <br />
                比例
              </td>
              <td class="xl119">
                <el-input
                  v-model="moldingForm.moldSmRate"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td
                class="xl70"
                height="20"
                colspan="20"
                style="
                  height: 15pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                成型参数设定
              </td>
            </tr>
            <tr height="20">
              <td
                class="xl78"
                height="240"
                rowspan="12"
                style="
                  height: 180pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                成型参数设定
              </td>
              <td class="xl79" colspan="3">项目</td>
              <td class="xl72" colspan="3">压力</td>
              <td class="xl79" colspan="2">速度</td>
              <td class="xl72" colspan="3">位置/时间</td>
              <td class="xl79" colspan="3">项目</td>
              <td class="xl72">背压</td>
              <td class="xl111">压力</td>
              <td class="xl122" colspan="2">速度</td>
              <td class="xl111">位置</td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">射胶1</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.sgPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.sgSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">
                <el-input
                  v-model="moldingForm.sgLocation1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">储料1</td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.storingBackPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.storingPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl122" colspan="2">
                <el-input
                  v-model="moldingForm.storingSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.storingLocation1"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">射胶2</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.sgPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.sgSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">
                <el-input
                  v-model="moldingForm.sgLocation2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">储料2</td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.storingBackPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.storingPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl122" colspan="2">
                <el-input
                  v-model="moldingForm.storingSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.storingLocation2"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">射胶3</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.sgPressure3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.sgSpeed3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">
                <el-input
                  v-model="moldingForm.sgLocation3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">储料3</td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.storingBackPressure3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.storingPressure3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl122" colspan="2">
                <el-input
                  v-model="moldingForm.storingSpeed3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.storingLocation3"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">射胶4</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.sgPressure4"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.sgSpeed4"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">
                <el-input
                  v-model="moldingForm.sgLocation4"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">松退</td>
              <td class="xl72">
                <el-input disabled readonly class="readonlyInput" />
              </td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.sbdPressure"
                  class="readonlyInput"
                />
              </td>
              <td class="xl122" colspan="2">
                <el-input
                  v-model="moldingForm.sbdSpeed"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.sbdLocation"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">射胶5</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.sgPressure5"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.sgSpeed5"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">
                <el-input
                  v-model="moldingForm.sgLocation5"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">射出时间</td>
              <td class="xl72" colspan="5">
                <el-input
                  v-model="moldingForm.injectionTime"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">射胶6</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.sgPressure6"
                  readonly
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.sgSpeed6"
                  readonly
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">
                <el-input
                  v-model="moldingForm.sgLocation6"
                  readonly
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">冷却时间</td>
              <td class="xl72" colspan="5">
                <el-input
                  v-model="moldingForm.coolingTime"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">保压1</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.pmPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.pmSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl107" colspan="3">
                <el-input
                  v-model="moldingForm.pmLocation1"
                  class="readonlyInput"
                />
                <span style="mso-spacerun: yes">&nbsp;</span>
              </td>
              <td class="xl79" colspan="3">储料时间</td>
              <td class="xl72" colspan="5">
                <el-input
                  v-model="moldingForm.storingTime"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">保压2</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.pmPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.pmSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl107" colspan="3">
                <el-input
                  v-model="moldingForm.pmLocation2"
                  class="readonlyInput"
                />
                <span style="mso-spacerun: yes">&nbsp;</span>
              </td>
              <td class="xl79" colspan="3">残量mm</td>
              <td class="xl72" colspan="5">
                <el-input
                  v-model="moldingForm.remnantMM"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">保压3</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.pmPressure3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input
                  v-model="moldingForm.pmSpeed3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">
                <el-input
                  v-model="moldingForm.pmLocation3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="3">保压切换</td>
              <td class="xl72" colspan="5">
                <el-input
                  v-model="moldingForm.pmSwitchover"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">料筒温度</td>
              <td class="xl72" colspan="3">喷嘴</td>
              <td class="xl79" colspan="2">第1段</td>
              <td class="xl79" colspan="3">第2段</td>
              <td class="xl79" colspan="3">第3段</td>
              <td class="xl79" colspan="2">第4段</td>
              <td class="xl79" colspan="2">第5段</td>
              <td class="xl72">第6段</td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="3">实际温度</td>
              <td class="xl72" colspan="3">
                <el-input
                  v-model="moldingForm.ctNozzle"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">
                <el-input v-model="moldingForm.ct1" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="3">
                <el-input v-model="moldingForm.ct2" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="3">
                <el-input v-model="moldingForm.ct3" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">
                <el-input v-model="moldingForm.ct4" class="readonlyInput" />
              </td>
              <td class="xl122" colspan="2">
                <el-input v-model="moldingForm.ct5" class="readonlyInput" />
              </td>
              <td class="xl72">
                <el-input v-model="moldingForm.ct6" class="readonlyInput" />
              </td>
            </tr>
            <tr
              height="6.80"
              style="
                height: 5.1pt;
                mso-height-source: userset;
                mso-height-alt: 102;
              "
            >
              <td
                class="xl82"
                height="6.80"
                colspan="20"
                style="
                  height: 5.1pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              ></td>
            </tr>
            <tr height="20">
              <td
                class="xl78"
                height="140"
                rowspan="7"
                style="
                  height: 105pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                时序控制器设定
              </td>
              <td class="xl79" colspan="2">进胶点</td>
              <td class="xl81">延时</td>
              <td class="xl79" colspan="2">开放</td>
              <td class="xl79" colspan="2">进胶点</td>
              <td class="xl81">延时</td>
              <td class="xl81">开放</td>
              <td class="xl79" colspan="2">进胶点</td>
              <td class="xl79" colspan="2">延时/开放</td>
              <td class="xl79" colspan="2">延时/开放</td>
              <td class="xl72" colspan="4">阀针位置简要描述</td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="2">T1</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay1"
                  class="readonlyInput"
                />
                <span style="mso-spacerun: yes">&nbsp;</span>
              </td>
              <td class="xl84" colspan="2">
                <el-input v-model="moldingForm.tsOpen1" class="readonlyInput" />
                <span style="mso-spacerun: yes">&nbsp;</span>
              </td>
              <td class="xl79" colspan="2">T7</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay7"
                  class="readonlyInput"
                />
              </td>
              <td class="xl83">
                <el-input v-model="moldingForm.tsOpen7" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T13</td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsTimeDelay13"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsOpen13"
                  class="readonlyInput"
                />
              </td>
              <td rowspan="12" colspan="4">
                &emsp;
                <el-input
                  type="textarea"
                  v-model="moldingForm.rightDesc1"
                  class="readonlyInput"
                  rows="18"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="2">T2</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input v-model="moldingForm.tsOpen2" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T8</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay8"
                  class="readonlyInput"
                />
              </td>
              <td class="xl83">
                <el-input v-model="moldingForm.tsOpen8" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T14</td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsTimeDelay14"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsOpen14"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="2">T3</td>
              <td class="xl85">
                <el-input
                  v-model="moldingForm.tsTimeDelay3"
                  class="readonlyInput"
                />
              </td>
              <td
                class="xl86"
                colspan="2"
                style="border-right: none; border-bottom: none"
              >
                <el-input v-model="moldingForm.tsOpen3" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T9</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay9"
                  class="readonlyInput"
                />
              </td>
              <td class="xl83">
                <el-input v-model="moldingForm.tsOpen9" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T15</td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsTimeDelay15"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsOpen15"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="2">T4</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay4"
                  class="readonlyInput"
                />
              </td>
              <td
                class="xl86"
                colspan="2"
                style="border-right: none; border-bottom: none"
              >
                <el-input v-model="moldingForm.tsOpen4" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T10</td>
              <td class="xl85">
                <el-input
                  v-model="moldingForm.tsTimeDelay10"
                  class="readonlyInput"
                />
              </td>
              <td class="xl85">
                <el-input
                  v-model="moldingForm.tsOpen10"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">T16</td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsTimeDelay16"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsOpen16"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="2">T5</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay5"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input v-model="moldingForm.tsOpen5" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T11</td>
              <td class="xl85">
                <el-input
                  v-model="moldingForm.tsTimeDelay11"
                  class="readonlyInput"
                />
              </td>
              <td class="xl85">
                <el-input
                  v-model="moldingForm.tsOpen11"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">T17</td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsTimeDelay17"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsOpen17"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="2">T6</td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsTimeDelay6"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input v-model="moldingForm.tsOpen6" class="readonlyInput" />
              </td>
              <td class="xl79" colspan="2">T12</td>
              <td class="xl85">
                <el-input
                  v-model="moldingForm.tsTimeDelay12"
                  class="readonlyInput"
                />
              </td>
              <td class="xl83">
                <el-input
                  v-model="moldingForm.tsOpen12"
                  class="readonlyInput"
                />
              </td>
              <td class="xl79" colspan="2">T18</td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsTimeDelay18"
                  class="readonlyInput"
                />
              </td>
              <td class="xl84" colspan="2">
                <el-input
                  v-model="moldingForm.tsOpen18"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td
                class="xl78"
                height="120"
                rowspan="6"
                style="
                  height: 90pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                热流道温度
              </td>
              <td class="xl87" colspan="2">T1</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr1" class="readonlyInput" />
              </td>
              <td class="xl88">T7</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr7" class="readonlyInput" />
              </td>
              <td class="xl88">T13</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr13" class="readonlyInput" />
              </td>
              <td class="xl72">T19</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr19" class="readonlyInput" />
              </td>
              <td class="xl72">T25</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr25" class="readonlyInput" />
              </td>
              <td class="xl72">T31</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr31" class="readonlyInput" />
              </td>
              <td class="xl72">T37</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr37" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl87" colspan="2">T2</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr2" class="readonlyInput" />
              </td>
              <td class="xl88">T8</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr8" class="readonlyInput" />
              </td>
              <td class="xl88">T14</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr14" class="readonlyInput" />
              </td>
              <td class="xl72">T20</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr20" class="readonlyInput" />
              </td>
              <td class="xl72">T26</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr26" class="readonlyInput" />
              </td>
              <td class="xl72">T32</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr32" class="readonlyInput" />
              </td>
              <td class="xl72">T38</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr38" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl87" colspan="2">T3</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr3" class="readonlyInput" />
              </td>
              <td class="xl88">T9</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr9" class="readonlyInput" />
              </td>
              <td class="xl88">T15</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr15" class="readonlyInput" />
              </td>
              <td class="xl72">T21</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr21" class="readonlyInput" />
              </td>
              <td class="xl72">T27</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr27" class="readonlyInput" />
              </td>
              <td class="xl72">T33</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr33" class="readonlyInput" />
              </td>
              <td class="xl72">T39</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr39" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl87" colspan="2">T4</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr4" class="readonlyInput" />
              </td>
              <td class="xl88">T10</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr10" class="readonlyInput" />
              </td>
              <td class="xl88">T16</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr16" class="readonlyInput" />
              </td>
              <td class="xl72">T22</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr22" class="readonlyInput" />
              </td>
              <td class="xl72">T28</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr28" class="readonlyInput" />
              </td>
              <td class="xl72">T34</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr34" class="readonlyInput" />
              </td>
              <td class="xl72">T40</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr40" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl87" colspan="2">T5</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr5" class="readonlyInput" />
              </td>
              <td class="xl88">T11</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr11" class="readonlyInput" />
              </td>
              <td class="xl88">T17</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr17" class="readonlyInput" />
              </td>
              <td class="xl72">T23</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr23" class="readonlyInput" />
              </td>
              <td class="xl72">T29</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr29" class="readonlyInput" />
              </td>
              <td class="xl72">T35</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr35" class="readonlyInput" />
              </td>
              <td class="xl72">T41</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr41" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl87" colspan="2">T6</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr6" class="readonlyInput" />
              </td>
              <td class="xl88">T12</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr12" class="readonlyInput" />
              </td>
              <td class="xl88">T18</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr18" class="readonlyInput" />
              </td>
              <td class="xl72">T24</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr24" class="readonlyInput" />
              </td>
              <td class="xl72">T30</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr30" class="readonlyInput" />
              </td>
              <td class="xl72">T36</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr36" class="readonlyInput" />
              </td>
              <td class="xl72">T42</td>
              <td class="xl88">
                <el-input v-model="moldingForm.hr42" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td
                class="xl78"
                height="80"
                rowspan="4"
                style="
                  height: 60pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                模
                <span style="mso-spacerun: yes">&nbsp;</span>
                温
                <span style="mso-spacerun: yes">&nbsp;</span>
                设
                <span style="mso-spacerun: yes">&nbsp;</span>
                定
              </td>
              <td class="xl89" colspan="15">
                <el-input v-model="moldingForm.dt1" class="readonlyInput" />
                <el-input v-model="moldingForm.dt2" class="readonlyInput" />
              </td>
              <td class="xl135" colspan="4" rowspan="4">
                备注：
                <el-input
                  type="textarea"
                  v-model="moldingForm.rightDesc2"
                  class="readonlyInput"
                  rows="5"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl89" colspan="15">
                <el-input v-model="moldingForm.dt3" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl79" colspan="15">
                <el-input v-model="moldingForm.dt4" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20"></tr>
            <tr
              height="6.80"
              style="
                height: 5.1pt;
                mso-height-source: userset;
                mso-height-alt: 102;
              "
            >
              <td
                class="xl91"
                height="6.80"
                colspan="20"
                style="
                  height: 5.1pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              ></td>
            </tr>
            <tr height="20">
              <td
                class="xl78"
                height="200"
                rowspan="10"
                style="
                  height: 150pt;
                  border-right: 0.5pt solid windowtext;
                  border-bottom: 0.5pt solid windowtext;
                "
              >
                开关模
                <span style="mso-spacerun: yes">&nbsp;</span>
                / 顶出
              </td>
              <td class="xl78" rowspan="6">
                合
                <br />
                <br />
                模
              </td>
              <td class="xl72" colspan="3">项目</td>
              <td class="xl72" colspan="2">压力</td>
              <td class="xl72" colspan="2">速度</td>
              <td class="xl72" colspan="2">位置</td>
              <td class="xl110" rowspan="6">
                开
                <br />
                <br />
                模
              </td>
              <td class="xl72" colspan="3">项目</td>
              <td class="xl111">压力</td>
              <td class="xl146">速度</td>
              <td class="xl146" colspan="2">位置</td>
              <td class="xl146">低压时间</td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">关模快速</td>
              <td
                class="xl93"
                colspan="2"
                style="border-right: none; border-bottom: none"
              >
                <el-input
                  v-model="moldingForm.msPressureFast"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msSpeedFast"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msLocationFast"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">开模一段</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.omPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.omSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.omLocation1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" rowspan="4">
                <el-input
                  type="textarea"
                  v-model="moldingForm.lpTime"
                  class="readonlyInput"
                  rows="5"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">关模中速</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msPressureMS"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msSpeedMS"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msLocationMS"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">开模二段</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.omPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.omSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.omLocation2"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">关模慢速</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msPressureSlow"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msSpeedSlow"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msLocationSlow"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">开模三段</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.omPressure3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.omSpeed3"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.omLocation3"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">关模低压</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msPressureLP"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msSpeedLP"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msLocationLP"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">开模四段</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.omPressure4"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.omSpeed4"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.omLocation4"
                  class="readonlyInput"
                />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">关模高压</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msPressureHP"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msSpeedHP"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.msLocationHP"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">开模终点</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.omPressureEnd"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.omSpeedEnd"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.omLocationEnd"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">时间</td>
            </tr>
            <tr height="20">
              <td class="xl78" rowspan="4">
                顶
                <br />
                <br />
                出
              </td>
              <td class="xl72" colspan="3">顶针进一</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dzjPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dzjSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dzjLocation1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl110" rowspan="4">
                中
                <br />
                <br />
                子
              </td>
              <td class="xl72" colspan="3">中子一进</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.zzjPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.zzjSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.zzjLocation1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input v-model="moldingForm.times1" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">顶针进二</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dzjPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dzjSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dzjLocation2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">中子一退</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.zztPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.zztSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.zztLocation1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input v-model="moldingForm.times2" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">顶针退一</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dztPressure1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dztSpeed1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dztLocation1"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">中子二进</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.zzjPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.zzjSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.zzjLocation2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input v-model="moldingForm.times3" class="readonlyInput" />
              </td>
            </tr>
            <tr height="20">
              <td class="xl72" colspan="3">顶针退二</td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dztPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.dztSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl85" colspan="2">
                <el-input
                  v-model="moldingForm.dztLocation2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="3">中子二退</td>
              <td class="xl111">
                <el-input
                  v-model="moldingForm.zztPressure2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input
                  v-model="moldingForm.zztSpeed2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72" colspan="2">
                <el-input
                  v-model="moldingForm.zztLocation2"
                  class="readonlyInput"
                />
              </td>
              <td class="xl72">
                <el-input v-model="moldingForm.times4" class="readonlyInput" />
              </td>
            </tr>
          </tbody>
        </table>
      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="saveMolding">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listItdDet,
  getItdDet,
  delItdDet,
  addItdDet,
  updateItdDet,
  exportItdDet,
  uploadItds,
  uploadItd,
  treeSelect,
  clickItdFileList,
} from "@/api/project/itdDet";
import { delDocList, updateDocList } from "@/api/project/docList";
import { getJtmByTon, selectJtmByInput } from "@/api/project/jtm";
import {
  getItmWldmAndCustWldmList,
  selectItmByWldm,
} from "@/api/project/materiel";
import { getMjmByMjbhOne, mjmMjbhDict } from "@/api/project/mjmMstr";
import { getBodFxdmByZxdm } from "@/api/project/bm";
import { addMoldingMstr, getInfoByMjbh } from "@/api/project/MoldingMstr";
import { printOrder } from "@/utils/ruoyi";

export default {
  name: "ItdDet",
  data() {
    return {
      // 用户导入参数
      formTitle: "",
      moldOpen: false,
      tableHChild: 1,
      tableH: 1,
      jtBz: "",
      Jt: "",
      submitJt: "",
      itdMjmc: "",
      Dw: {},
      jtBh: "",
      activeTab: "first",
      // 模具资料信息表格数据
      mjmMstrList: [],
      // 成型参数
      FileAList: [],
      //作业标准
      FileBList: [],
      //图纸信息
      FileCList: [],
      jtdwOptions: [],
      //文件类型字典
      docTypeOptions: [],
      //物料代码字典
      custwldmOptions: [],
      //父项物料代码字典
      FxWldmOptions: [],
      //物料代码前50
      custwldmList: [],
      //模具编号字典
      mjmMjbhOptions: [],
      //模具编号前50
      mjmMjbhList: [],
      //机台吨位字典
      machineTonsList: [],
      // 部门树选项
      deptOptions: [],
      defaultProps: {
        children: "children",
        label: "label",
      },
      // 遮罩层
      loading: true,
      //下载内容
      upDateContainer: null,
      // 导出遮罩层
      exportLoading: false,
      treeLoad: false,
      expandedKey: [0],
      // 选中数组
      ids: [],
      mjbhs: [],
      Jts: [],
      unique: {},
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      //选中的物料代码和模具代码
      clikcData: {},
      clickMjbh: "",
      clickWldm: "",
      fxWldm: "",
      fxPmgg: "",
      clickTzbh: "",
      itdPmgg: "",
      itdCustwldm: "",
      // 总条数
      total: 0,
      // 模具对应物料信息表格数据
      itdDetList: [],
      itmDetList: [],
      //树参数
      // queryTrees: {
      //   mjmJzid: null,
      //   mjmKhid: null
      // },
      // 弹出层标题
      title: "",
      titleStr: "",
      // 是否显示弹出层
      open: false,
      openStrA: false,
      openStrB: false,
      openSearch: false,
      openChoose: false,
      openForming: false,
      //选中的机台吨位
      clickedJtdw: "",
      jtmJtdw: "",
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        itdMjbh: null,
        itdWldm: null,
        mjmJzid: null,
        mjmKhid: null,
        nopg: "-1",
      },
      moldingForm: {},
      itmPmggs: "",
      itdMjmcs: "",
      // 表单参数
      form: {
        jtmJtdw: "",
        docDjbh: "",
      },
      // 表单校验
      rules: {
        jtmJtdw: [
          { required: true, message: "机台吨位不能为空", trigger: "blur" },
        ],
      },
    };
  },
  created() {
    mjmMjbhDict().then((res) => {
      this.mjmMjbhOptions = res.data;
    });

    getItmWldmAndCustWldmList().then((res) => {
      for (let i of res.data) {
        this.custwldmOptions.push(i.itmWldm);
      }
    });

    selectJtmByInput().then((res) => {
      this.jtdwOptions = res.data;
    });
    this.getTreeselect();
    this.getList();
    this.getDicts("fileType").then((response) => {
      this.docTypeOptions = response.data;
    });
  },
  methods: {
    handleClick(type) {
      this.formTitle = window.document.title;
      if (type == "A") {
        this.title = "成型参数";
        this.Jt = "";
        this.Dw = "";
        this.openStrA = true;
        this.title = "成型参数";
      } else if (type == "B") {
        this.FxWldmOptions = [];
        getBodFxdmByZxdm(this.clickWldm).then((res) => {
          this.FxWldmOptions = res.data;
          this.FxWldmOptions.push({
            bod_fxdm: this.clikcData.itdWldm,
            itm_custwldm: this.clikcData.itmCustwldm,
            itm_pmgg: this.clikcData.itmPmgg,
          });

          this.openStrB = true;
          this.title = "作业标准";
        });
      }
    },

    //返回数据
    requestUpload() {},
    /** 查看文件按钮操作 */
    handleImgLook(a) {
      let files = process.env.VUE_APP_BASE_API + a.docPath;
      window.open(files);
    },
    /** 修改成型参数适用机台吨位操作 */
    handleImgUpdate(row) {
      this.title = "修改成型参数";
      this.form.docDjbh = row.docDjbh;
      this.openForming = true;
    },
    /** 删除文件按钮操作 */
    handleFileDelete(row) {
      const djbh = row.docDjbh;
      this.$confirm(
        '是否确认删除文件编号为"' + djbh + '"的数据记录及文件?',
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(function () {
          return delDocList(djbh);
        })
        .then(() => {
          this.ItdFileList({
            itdMjbh: row.itdMjbh,
            itmTzbh: row.itmTzbh,
            itdWldm: row.itdWldm,
          });
          this.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    // 筛选节点
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    getTreeselect() {
      treeSelect().then((response) => {
        const tree = this.$refs.tree;
        const tmpKey = tree.getCurrentKey();
        if (tmpKey) {
          this.expandedKey = [tmpKey];
          this.$nextTick(() => {
            tree.setCurrentKey(tmpKey);
          });
        }
        var tmp = [];
        tmp.push(Object.assign({}, this.deptOptions[0], response.data));
        this.deptOptions = tmp;
        //this.treeLoad = true
      });
    },
    handleNodeClick(data) {
      if (data.parentId == null) {
        this.queryParams.mjmKhid = data.id;
        this.queryParams.mjmJzid = null;
        this.queryParams.pageNum = 1;
        this.clickMjmKhid = data.id;
        this.clickMjmJzid = null;
      } else {
        this.queryParams.pageNum = 1;
        this.queryParams.mjmJzid = data.id;
        this.queryParams.mjmKhid = data.parentId;
        this.clickMjmJzid = data.id;
        this.clickMjmKhid = data.parentId;
      }
      listItdDet(this.queryParams).then((response) => {
        this.itdDetList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    //查询子项
    getItdFileList(row) {
      if (row) {
        this.clikcData = row;
        this.clickMjbh = row.itdMjbh;
        this.clickWldm = row.itdWldm;
        this.clickTzbh = row.itmTzbh || row.itmCustwldm;
        this.itdMjmc = row.mjmMjmc;
        this.itdPmgg = row.itmPmgg;
        this.itdCustwldm = row.itmCustwldm;
        this.ItdFileList();
      } else {
        this.clikcData = null;
        this.clickMjbh = null;
        this.clickWldm = null;
        this.clickTzbh = null;
        this.FileAList = [];
        this.FileBList = [];
        this.FileCList = [];
      }
    },
    ItdFileList() {
      const query = {
        itdMjbh: this.clickMjbh,
        itmTzbh: this.clickTzbh,
        itdWldm: this.clickWldm,
      };
      if (query != null) {
        clickItdFileList(query).then((response) => {
          this.FileAList = response.data.A;
          this.FileBList = response.data.B;
          this.FileCList = response.data.C;
        });
      }
    },
    beforeUploading(file, fileType) {
      const reader = new FileReader();
      reader.readAsDataURL(file);
      reader.onload = () => {
        this.upDateContainer = reader.result;
        let formData = new FormData();
        formData.append("docType", fileType);
        formData.append("file", file);
        formData.append("itdMjbh", this.clickMjbh);
        formData.append("docJtdw", this.form.jtmJtdw);
        formData.append("docSyjt", this.Jt);
        formData.append("docSybh", this.fxWldm);
        formData.append("docTzbh", this.itdCustwldm);
        formData.append("itdWldm", this.clickWldm);
        formData.append("docDesc", this.jtBz);
        console.log(this.form.jtmJtdw);
        console.log(this.Jt);
        uploadItd(formData).then((response) => {
          this.ItdFileList({
            itdMjbh: this.clickMjbh,
            itmTzbh: this.itdCustwldm,
            itdWldm: this.clickWldm,
          });
          this.$message.success("文件上传成功"); //文件上提示
          this.openStrA = false;
          this.openStrB = false;
          this.jtBz = "";
          this.form.jtmJtdw = "";
          this.Jt = "";
        });
      };
    },
    // 上传预处理
    beforeUpload(file, fileType) {
      const reader = new FileReader();
      reader.readAsDataURL(file);
      reader.onload = () => {
        this.upDateContainer = reader.result;
        let formData = new FormData();
        formData.append("docType", fileType);
        formData.append("file", file);
        formData.append("itdMjbh", this.clickMjbh);
        formData.append("itdWldm", this.clickWldm);
        formData.append("tzbh", this.clickTzbh);
        uploadItds(formData).then((response) => {
          this.ItdFileList(this.clickMjbh);
          this.$message.success("文件上传成功"); //文件上提示
        });
      };
    },
    /** 查询模具对应物料信息列表 */
    getList() {
      this.loading = true;
      this.tableHTree = document.body.clientHeight - 160;
      this.tableH = this.tableHTree / 2;
      this.tableHChild = this.tableH - 50;
      this.queryParams.pageSize = this.tableH > 350 ? 14 : 10;
      this.$nextTick(() => {
        this.$refs.tree.store.defaultExpandAll = false;
      });
      listItdDet(this.queryParams).then((response) => {
        this.itdDetList = response.rows;
        this.total = response.total;
        this.loading = false;
        this.$refs.tabIdt.setCurrentRow(this.itdDetList[0]);
        this.getItdFileList(this.itdDetList[0]);
      });
      // this.getTreeselect()
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
      this.openSearch = false;
      this.openForming = false;
      this.moldOpen = false;
    },
    // 取消按钮
    cancelStr() {
      this.openStrA = false;
      this.openStrB = false;
    },
    cancelChoose() {
      this.openChoose = false;
      this.Jt = "";
    },
    clickChoose() {
      this.openChoose = true;
      this.titleStr = "设备选取";
      const jtmsJtdw = this.form.jtmJtdw;
      getJtmByTon({ jtmJtdw: jtmsJtdw }).then((response) => {
        this.itmDetList = response.data;
      });
    },
    querySearch(queryString, cb) {
      const jtmJtdw = this.form.jtmJtdw;
      selectJtmByInput(jtmJtdw).then((response) => {
        this.Dw = response.data;
        for (let item of this.Dw) {
          item.value = item.jtmJtdw;
        }
        cb(this.Dw);
      });
    },
    //数组去重

    // 表单重置
    reset() {
      this.form = {
        itdId: null,
        itdMjbh: null,
        itdWldm: null,
        itdXs: null,
        itdCxsj: null,
        itdJgrs: null,
        itdDj: null,
        itdJggs: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        Dw: null,
      };

      this.resetForm("form");
    },
    resetMold() {
      this.moldingForm = {
        rightDesc1: null,
        rightDesc2: null,
        moldId: null,
        moldJtdw: null,
        moldJt: null,
        cusName: null,
        itmWlpm: null,
        mjmXs: null,
        molSm: null,
        itmYsdm: null,
        moldMjbh: null,
        moldCustwldm: null,
        moldDw: null,
        moldRawMaterial: null,
        moldZq: null,
        moldSmRate: null,
        moldHlwd: null,
        sgPressure1: null,
        sgSpeed1: null,
        sgLocation1: null,
        sgPressure2: null,
        sgSpeed2: null,
        sgLocation2: null,
        sgPressure3: null,
        sgSpeed3: null,
        sgLocation3: null,
        sgPressure4: null,
        sgSpeed4: null,
        sgLocation4: null,
        sgPressure5: null,
        sgSpeed5: null,
        sgLocation5: null,
        pmPressure1: null,
        pmSpeed1: null,
        pmLocation1: null,
        pmPressure2: null,
        pmSpeed2: null,
        pmLocation2: null,
        pmPressure3: null,
        pmSpeed3: null,
        pmLocation3: null,
        storingBackPressure1: null,
        storingPressure1: null,
        storingSpeed1: null,
        storingLocation1: null,
        storingBackPressure2: null,
        storingPressure2: null,
        storingSpeed2: null,
        storingLocation2: null,
        storingBackPressure3: null,
        storingPressure3: null,
        storingSpeed3: null,
        storingLocation3: null,
        sbdPressure: null,
        sbdSpeed: null,
        sbdLocation: null,
        injectionTime: null,
        coolingTime: null,
        storingTime: null,
        remnantMM: null,
        pmSwitchover: null,
        ctNozzle: null,
        ct1: null,
        ct2: null,
        ct3: null,
        ct4: null,
        ct5: null,
        ct6: null,
        tsTimeDelay1: null,
        tsOpen1: null,
        tsTimeDelay2: null,
        tsOpen2: null,
        tsTimeDelay3: null,
        tsOpen3: null,
        tsTimeDelay4: null,
        tsOpen4: null,
        tsTimeDelay5: null,
        tsOpen5: null,
        tsTimeDelay6: null,
        tsOpen6: null,
        tsTimeDelay7: null,
        tsOpen7: null,
        tsTimeDelay8: null,
        tsOpen8: null,
        tsTimeDelay9: null,
        tsOpen9: null,
        tsTimeDelay10: null,
        tsOpen10: null,
        tsTimeDelay11: null,
        tsOpen11: null,
        tsTimeDelay12: null,
        tsOpen12: null,
        tsTimeDelay13: null,
        tsOpen13: null,
        tsTimeDelay14: null,
        tsOpen14: null,
        tsTimeDelay15: null,
        tsOpen15: null,
        tsTimeDelay16: null,
        tsOpen16: null,
        tsTimeDelay17: null,
        tsOpen17: null,
        tsTimeDelay18: null,
        tsOpen18: null,
        hr1: null,
        hr2: null,
        hr3: null,
        hr4: null,
        hr5: null,
        hr6: null,
        hr7: null,
        hr8: null,
        hr9: null,
        hr10: null,
        hr11: null,
        hr12: null,
        hr13: null,
        hr14: null,
        hr15: null,
        hr16: null,
        hr17: null,
        hr18: null,
        hr19: null,
        hr20: null,
        hr21: null,
        hr22: null,
        hr23: null,
        hr24: null,
        hr25: null,
        hr26: null,
        hr27: null,
        hr28: null,
        hr29: null,
        hr30: null,
        hr31: null,
        hr32: null,
        hr33: null,
        hr34: null,
        hr35: null,
        hr36: null,
        hr37: null,
        hr38: null,
        hr39: null,
        hr40: null,
        hr41: null,
        hr42: null,
        dt1: "前模（   ）组机水，水温（  ）℃，（    ）组机水",
        dt2: "后模（  ）组热水，水温（  ）℃，（    ）组冰水",
        dt3: "行位（    ）组热水，水温（    ）℃，（　  ）组机水",
        dt4: "行位（    ）组热水，水温（    ）℃，（　  ）组机水",
        msPressureFast: null,
        msSpeedFast: null,
        msLocationFast: null,
        msPressureMS: null,
        msSpeedMS: null,
        msLocationMS: null,
        msPressureSlow: null,
        msSpeedSlow: null,
        msLocationSlow: null,
        msPressureLP: null,
        msSpeedLP: null,
        msLocationLP: null,
        msPressureHP: null,
        msSpeedHP: null,
        msLocationHP: null,
        omPressure1: null,
        omSpeed1: null,
        omLocation1: null,
        omPressure2: null,
        omSpeed2: null,
        omLocation2: null,
        omPressure3: null,
        omSpeed3: null,
        omLocation3: null,
        omPressure4: null,
        omSpeed4: null,
        omLocation4: null,
        omPressureEnd: null,
        omSpeedEnd: null,
        omLocationEnd: null,
        dzjPressure1: null,
        dzjSpeed1: null,
        dzjLocation1: null,
        dzjPressure2: null,
        dzjSpeed2: null,
        dzjLocation2: null,
        dztPressure1: null,
        dztSpeed1: null,
        dztLocation1: null,
        dztPressure2: null,
        dztSpeed2: null,
        dztLocation2: null,
        zzjPressure1: null,
        zzjSpeed1: null,
        zzjLocation1: null,
        zzjPressure2: null,
        zzjSpeed2: null,
        zzjLocation2: null,
        zztPressure1: null,
        zztSpeed1: null,
        zztLocation1: null,
        zztPressure2: null,
        zztSpeed2: null,
        zztLocation2: null,
        lpTime: null,
        times1: null,
        times2: null,
        times3: null,
        times4: null,
      };
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
      this.openSearch = false;
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.itdId);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
      this.mjbhs = selection.map((item) => item.itdMjbh);
    },
    handleSelectionChanges(selection) {
      this.jtBh = selection.map((item) => item.jtmJtbh);
      let a = "";
      for (const itm of this.jtBh) {
        a += itm + ",";
      }
      a = a.slice(0, a.length - 1);
      this.Jt = a;
    },
    submitFormJt() {
      this.openChoose = false;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.getWldmListTOP50("");
      this.getMjbhListTOP50("");
      this.reset();
      this.open = true;
      this.title = "添加模具对应物料信息";
    },
    handleSearch() {
      this.reset();
      this.title = "查询模具对应物料信息";
      this.openSearch = true;
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.getWldmListTOP50("");
      this.getMjbhListTOP50("");
      this.reset();
      const itdId = row.itdId || this.ids;
      getItdDet(itdId).then((response) => {
        this.form = response.data;
        this.itdMjmcs = response.data.mjmMjmc;
        this.itmPmggs = response.data.itmPmgg;
        this.open = true;
        this.title = "修改模具对应物料信息";
      });
    },
    getWldmListTOP50(input) {
      let temp = [];
      let that = this;
      new Promise(function (resolve, reject) {
        for (let i of that.custwldmOptions) {
          if (i.indexOf(input) != -1) {
            temp.push(i);
          }
        }
        resolve(temp);
      }).then((res) => {
        that.custwldmList = res.slice(0, 50);
      });
    },
    getMjbhListTOP50(input) {
      let temp = [];
      let that = this;
      new Promise(function (resolve, reject) {
        for (let i of that.mjmMjbhOptions) {
          if (i.indexOf(input) != -1) {
            temp.push(i);
          }
        }
        resolve(temp);
      }).then((res) => {
        that.mjmMjbhList = res.slice(0, 50);
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.itdId != null) {
            updateItdDet(this.form).then((response) => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addItdDet(this.form).then((response) => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 更新成型参数适用机台和吨位 */
    updateFormingParameter() {
      updateDocList({
        docJtdw: this.form.jtmJtdw + "T",
        docSyjt: this.Jt,
        docDjbh: this.form.docDjbh,
      }).then((res) => {
        this.msgSuccess("修改成功！");
        this.ItdFileList({
          itdMjbh: this.clickMjbh,
          itmTzbh: this.clickTzbh,
          itdWldm: this.clickWldm,
        });
        this.openForming = false;
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const itdIds = row.itdId || this.ids;
      this.$confirm(
        "是否确认删除模具编号:【" + this.mjbhs + "】的数据项?",
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(function () {
          return delItdDet(itdIds);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    pageChange(page) {
      this.queryParams.pageNum = page;
      this.queryParams.mjmJzid = this.clickMjmJzid;
      this.queryParams.mjmKhid = this.clickMjmKhid;
      this.getList();
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm("是否确认导出所有模具对应物料信息数据项?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.exportLoading = true;
          return exportItdDet(queryParams);
        })
        .then((response) => {
          this.download(response.msg);
          this.exportLoading = false;
        })
        .catch(() => {});
    },
    getMjmc(itdMjbh) {
      if (itdMjbh != null && itdMjbh != "") {
        getMjmByMjbhOne({ itdMjbh: itdMjbh }).then((response) => {
          if (response.data) {
            this.itdMjmcs = response.data.mjmMjmc;
            this.form.itdCxsj = response.data.mjmCxsj;
            this.form.itdXs = response.data.mjmXs;
          } else {
            this.itdMjmcs = "";
          }
        });
      } else {
        this.itdMjmcs = "";
      }
    },
    getPmgg(itmWldm, type) {
      if (type == "A") {
        if (itmWldm != null && itmWldm != "") {
          selectItmByWldm(itmWldm).then((response) => {
            if (response.data) {
              this.itmPmggs = response.data.itmPmgg;
            } else {
              this.itmPmggs = "";
            }
          });
        } else {
          this.itmPmggs = "";
        }
      } else if (type == "B") {
        for (let i of this.FxWldmOptions) {
          if (itmWldm == i.itm_custwldm) {
            this.fxPmgg = i.itm_pmgg;
            return;
          }
        }
      }
    },
    saveMolding() {
      this.moldingForm.moldJtdw = this.form.jtmJtdw;
      this.moldingForm.moldJt = this.Jt;
      if (!this.moldingForm.cusName) {
        this.msgError("模具没有客户信息，联系技术部处理~");
        return;
      }
      addMoldingMstr(this.moldingForm).then((res) => {
        this.moldOpen = false;
        this.reset();
        this.openStrA = false;
        this.ItdFileList({
          itdMjbh: this.clickMjbh,
          itmTzbh: this.itdCustwldm,
          itdWldm: this.clickWldm,
        });
      });
    },

    handleInsertMold() {
      this.resetMold();
      this.moldingForm.moldMjbh = this.clickMjbh;
      this.moldingForm.moldCustwldm = this.itdCustwldm;
      getInfoByMjbh({
        itdMjbh: this.clickMjbh,
        itmCustwldm: this.itdCustwldm,
      }).then((res) => {
        if (res.data.length > 0) {
          var first = res.data[0];
          if (!first.cusName) {
            this.msgError("模具没有客户信息，联系技术部处理");
          }
          this.moldingForm.itmWlpm = first.itmWlpm;
          this.moldingForm.cusName = first.cusName;
          this.moldingForm.mjmXs = first.mjmXs;
          this.moldingForm.molSm = first.molSm;
          this.moldingForm.itmYsdm = first.itmYsdm;
          this.moldingForm.moldRawMaterial = first.moldRawMaterial;
        }
        this.moldOpen = true;
      });
    },
    handleInspectionExport() {
      printOrder(
        "/project/MoldingMstr/exportInspection",
        null,
        "机台工艺稽查数据"
      );
    },
  },
};
</script>

<style lang="scss" scoped>
.app-container {
  ::v-deep .el-tab-pane {
    display: flex;

    .rbtn {
      background: white;
    }
  }
}

.app-container .table-border {
  ::v-deep .el-input--medium .el-input__inner {
    height: 29px;
    line-height: 29px;
    padding: 0px;
  }
}
</style>
